<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <li v-for="item in arr" >{{item}} </li>
        <button @click="fn">切换顺序</button>
    </div>

    <script src="../vue.js" ></script>
    <script>

        const app = new Vue({
            el: '#app',
            // data 配置数据
            data: {
                arr: ['帅哥','美女','小明'],
            },
            methods: {
                fn () {
                    const firstItem = this.arr[0]
                    // 删除数组的最后一项
                    this.arr.shift()
                    this.arr.push(firstItem)
                }
            }
        })

    </script>
</body>
</html>